import { getRecipelList } from '../../api/medicalFrontline/medicalFrontlineApi'
export default {
  //周涛私有
  namespaced: true,
  state: {
    // 全科室处方列表
    recipelList: [
    ],
    // 总条数
    total: 1
  },
  //修改数据
  mutations: {
    M_recipelList(state: any, payload: {}) {
      state.recipelList = payload
    },
    M_total(state: any, payload: {}) {
      state.total = payload
    },
  },
  //做异步处理的
  actions: {
    //获取全科室处方列表
    async A_recipelList({ commit }, payload: any) {
      let res = await getRecipelList(payload)
      console.log(res.data);
      commit('M_recipelList', res.data.data)
      commit('M_total', res.data.total)
    },

  },
  //store的计算属性
  getters: {},
}